/**
 * Copyright ©
 * 
 * @author: zw
 * @date: 2021-11-06 
 */


import React, { FC, ReactElement, useCallback ,useState } from 'react';
import Input from './Input'
import List from './List'
import { ITodo } from './typings';

 const TodoList: FC = (props): ReactElement => {
  const [ todoList, setTodoList ] = useState<ITodo[]>([]);

  const addTodo = useCallback((todo: ITodo) => {
      console.log(todo);
      
    }, [])

  return(
    <div className="">
      <Input addTodo={ addTodo } todoList={ todoList }></Input>
      <List></List>
    </div>
  )
}

export default TodoList

function useCallback(arg0: (todo: ITodo) => void, arg1: undefined[]) {
  throw new Error('Function not implemented.');
}
function useState(): [any, any] {
  throw new Error('Function not implemented.');
}

